package gui;

import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;

//class for default down arrow
public class GameArrowButton extends JButton{

	private static final long serialVersionUID = 1L;
	private static Icon icon;
	
	//static initialisation of Icon icon
	static{
		icon = new ImageIcon("pic/arrow_down.gif");
	}

	//constructor for this class
	public GameArrowButton() {
		setPreferredSize(new Dimension(10, 20));
		setIcon(icon);
	}
	
	//overriding method for lookout changing
	public void paintBorder(Graphics g){
		if(getModel().isPressed())
			g.setColor(GameConstants.COMPONENT_BORDER_OVER);
		else
			g.setColor(GameConstants.COMPONENT_BORDER);
		g.drawRect(1, 1, getWidth()-3, getHeight()-3);
		super.paintComponents(g);
	}
	
}